<?php

namespace App\Model\Admin;

use Illuminate\Database\Eloquent\Model;
use Gregwar\Captcha\CaptchaBuilder;
use Session;
use Auth;
use DB;

class Login extends Model
{
    protected $table = "admin";
    /**
    *
    *
    *
    */
    public static function add($arr)
    {
        $data['name']     = $arr->name;
        $data['nickname'] = $arr->nickname;
        $data['password'] = md5($arr->name);
        $data['phone']    = $arr->phone;
        $data['email']    = $arr->email;
        $data['count']    = 1;
        $data['lev']      = $arr->lev;
        $data['time']     = time();
        $id = DB::table('admin')->insertById($data);
        return $id;

    }
   


}